package com.model;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;
import org.hibernate.annotations.GenericGenerator;
@Entity
@Table(name="tb_suppliers")
public class SuppliersBean implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7619294698854223314L;
	@Id
	@GenericGenerator(name = "idGenerator", strategy = "uuid")
	@GeneratedValue(generator = "idGenerator")
	private String id;
	private String suppliers_name;//名称
	private String suppliers_address;//地址
	private String suppliers_contacts;//联系人
	private String suppliers_phone;//电话
	private String suppliers_fax;//传真
	
	@OneToMany(fetch=FetchType.LAZY,cascade=CascadeType.ALL,mappedBy="a_suppliers")
	@Fetch(FetchMode.SELECT)
	private Set<AssetsBean> assets_list;
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getSuppliers_name() {
		return suppliers_name;
	}
	public void setSuppliers_name(String suppliers_name) {
		this.suppliers_name = suppliers_name;
	}
	public String getSuppliers_address() {
		return suppliers_address;
	}
	public void setSuppliers_address(String suppliers_address) {
		this.suppliers_address = suppliers_address;
	}
	public String getSuppliers_contacts() {
		return suppliers_contacts;
	}
	public void setSuppliers_contacts(String suppliers_contacts) {
		this.suppliers_contacts = suppliers_contacts;
	}
	public String getSuppliers_phone() {
		return suppliers_phone;
	}
	public void setSuppliers_phone(String suppliers_phone) {
		this.suppliers_phone = suppliers_phone;
	}
	public String getSuppliers_fax() {
		return suppliers_fax;
	}
	public void setSuppliers_fax(String suppliers_fax) {
		this.suppliers_fax = suppliers_fax;
	}
	public Set<AssetsBean> getAssets_list() {
		return assets_list;
	}
	public void setAssets_list(Set<AssetsBean> assets_list) {
		this.assets_list = assets_list;
	}
	
}
